package com.study.example.study.extension.caffeinecache;

import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * channel 缓存
 *
 * @author RenYuLiang
 */
@Slf4j
@Component
public class CaffeineCacheService {


    /**
     * 获取缓存
     */
    @Scheduled(cron = "0/1 * * * * ?")
    public void getCache() {
        CaffeineCacheDTO dto = StringCaffeineCache.getCache(CaffeineCache.CAFFEINE_CACHE_KEY);
        log.info("获取缓存数据,dto={}", dto);
    }


}
